#pragma once

#include "form/IPanes.h"

class Panes: public IPanes
{
	typedef std::map<uint32,sys::ObjectPtr> PaneDictionary;

public:
	BEGIN_DEFINE_CLASS(CLSID_Panes)
		DEFINE_INTERFACE_ENTRY(IPanes)
	END_DEFINE_CLASS()

	Panes();
	virtual ~Panes();

	virtual IPane* CreatePane();
	virtual uint32 GetPanes(PaneList& panes) const;

private:
	virtual IPane* NewPane();
	PaneDictionary m_panes;
};
AUTO_REGISTER_CLASSMAP_ENTRY(Panes)

#ifndef PANEID_RESERVEID_FIRST
#define PANEID_RESERVEID_FIRST	48001
#endif

#ifndef PANEID_RESERVEID_LAST
#define PANEID_RESERVEID_LAST	49000
#endif

#ifndef IS_PANEID_RESERVER
#define IS_PANEID_RESERVER(id) ((id>=ID_RESERVEID_FIRST)&&(id<=ID_RESERVEID_LAST))
#endif